package com.microservice.example.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author JohnTang
 * @since 2017-09-30
 */
@TableName("w_user_info")
public class WUserInfo extends Model<WUserInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
	@TableId(value="user_id", type= IdType.AUTO)
	private Long userId;
    /**
     * 默认为0，业务来源，用户渠道类型
     */
	@TableField("user_source_type")
	private Integer userSourceType;
    /**
     * 用户姓名
     */
	@TableField("user_name")
	private String userName;
    /**
     * 用户手机号
     */
	@TableField("user_phone")
	private String userPhone;
    /**
     * 用户身份证18位
     */
	@TableField("user_id_card")
	private String userIdCard;
    /**
     * 用户是否认证。默认0没有认证；1认证成功
     */
	@TableField("user_auth")
	private Integer userAuth;
    /**
     * 用户状态。默认0正常；1无效
     */
	@TableField("user_status")
	private Integer userStatus;
    /**
     * 用户来源ID
     */
	@TableField("user_source_id")
	private Long userSourceId;
    /**
     * 用户等级 0:普通用户。TODO
     */
	@TableField("user_level")
	private Integer userLevel;
    /**
     * 用户创建时间
     */
	@TableField("user_create_time")
	private Date userCreateTime;
    /**
     * 1:手动开通 2：系统自动开通钱包
     */
	@TableField("open_flag")
	private Integer openFlag;
    /**
     * 用户类型：0:一般用户 1 商户
     */
	@TableField("user_type")
	private Integer userType;


	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Integer getUserSourceType() {
		return userSourceType;
	}

	public void setUserSourceType(Integer userSourceType) {
		this.userSourceType = userSourceType;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPhone() {
		return userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	public String getUserIdCard() {
		return userIdCard;
	}

	public void setUserIdCard(String userIdCard) {
		this.userIdCard = userIdCard;
	}

	public Integer getUserAuth() {
		return userAuth;
	}

	public void setUserAuth(Integer userAuth) {
		this.userAuth = userAuth;
	}

	public Integer getUserStatus() {
		return userStatus;
	}

	public void setUserStatus(Integer userStatus) {
		this.userStatus = userStatus;
	}

	public Long getUserSourceId() {
		return userSourceId;
	}

	public void setUserSourceId(Long userSourceId) {
		this.userSourceId = userSourceId;
	}

	public Integer getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(Integer userLevel) {
		this.userLevel = userLevel;
	}

	public Date getUserCreateTime() {
		return userCreateTime;
	}

	public void setUserCreateTime(Date userCreateTime) {
		this.userCreateTime = userCreateTime;
	}

	public Integer getOpenFlag() {
		return openFlag;
	}

	public void setOpenFlag(Integer openFlag) {
		this.openFlag = openFlag;
	}

	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	@Override
	protected Serializable pkVal() {
		return this.userId;
	}

	@Override
	public String toString() {
		return "WUserInfo{" +
			", userId=" + userId +
			", userSourceType=" + userSourceType +
			", userName=" + userName +
			", userPhone=" + userPhone +
			", userIdCard=" + userIdCard +
			", userAuth=" + userAuth +
			", userStatus=" + userStatus +
			", userSourceId=" + userSourceId +
			", userLevel=" + userLevel +
			", userCreateTime=" + userCreateTime +
			", openFlag=" + openFlag +
			", userType=" + userType +
			"}";
	}
}
